package com.ruoyi.biz.service.impl;

import com.ruoyi.biz.domain.Appoint;
import com.ruoyi.biz.mapper.AppointMapper;
import com.ruoyi.biz.service.IAppointService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Arrays;
import java.util.List;

/**
 * 预约Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-08-13
 */
@Service
public class AppointServiceImpl  implements IAppointService
{
    @Autowired
    private AppointMapper appointMapper;

    /**
     * 查询预约
     * 
     * @param id 预约主键
     * @return 预约
     */
    @Override
    public Appoint selectAppointById(Long id)
    {
        return appointMapper.selectAppointById(id);
    }

    /**
     * 查询预约列表
     * 
     * @param appoint 预约
     * @return 预约
     */
    @Override
    public List<Appoint> selectAppointList(Appoint appoint)
    {
        return appointMapper.selectAppointList(appoint);
    }

    /**
     * 新增预约
     * 
     * @param appoint 预约
     * @return 结果
     */
    @Override
    public int insertAppoint(Appoint appoint)
    {
        return appointMapper.insertAppoint(appoint);

    }

    /**
     * 修改预约
     * 
     * @param appoint 预约
     * @return 结果
     */
    @Override
    public int updateAppoint(Appoint appoint)
    {
        return appointMapper.updateAppoint(appoint);
    }

    /**
     * 批量删除预约
     * 
     * @param ids 需要删除的预约主键
     * @return 结果
     */
    @Override
    public int deleteAppointByIds(Long[] ids)
    {
       return appointMapper.deleteAppointByIds(ids);
    }

    /**
     * 删除预约信息
     * 
     * @param id 预约主键
     * @return 结果
     */
    @Override
    public int deleteAppointById(Long id)
    {


        return appointMapper.deleteAppointById(id);
    }
}
